﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace xowl.gmi.compiler
{
    abstract class Resource
    {
        protected string file;
        protected string name;
        protected string path;

        public string Name { get { return name; } }
        public string Directory { get { return path; } }

        public Resource(string file)
        {
            this.file = file;
            this.name = Path.GetFileNameWithoutExtension(file);
            this.path = Path.GetDirectoryName(file);
        }

        public string GetTarget(string extension) { return Path.Combine(path, name + extension); }

        public abstract bool Load();
    }
}
